package com.example.shopping.service;

import com.example.shopping.dao.ISellerDao;
import com.example.shopping.pojo.Seller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

/*
Create by 苍狼 于 2020/1/16
站在巅峰看世界，
落在深渊思人生。
*/
@Service

public class SellerServiceImpl implements SellerService {
    @Autowired(required = false)
    private ISellerDao sellerDao;


    @Override
    public List<Seller> selectSellerList() {
        return sellerDao.selectSellerList();
    }

    @Override
    public List<Seller> queryByLike(Seller seller) {
        return sellerDao.queryByLike(seller);
    }

    @Override
    public Seller SellerById(int id) {
        return sellerDao.SellerById(id);
    }

    @Override
    public int update(Seller seller) {
        return sellerDao.update(seller);
    }

    @Override
    public int updateCloseSeller(int id) {
        return sellerDao.updateCloseSeller(id);
    }

    @Override
    public int updateStatusYes(int id) {
        return sellerDao.updateStatusYes(id);
    }

    @Override
    public int updateStatusNo(int id) {
        return sellerDao.updateStatusNo(id);
    }

    @Override
    public List<Seller> SellerByLikeStatus(int status) {
        return sellerDao.SellerByLikeStatus(status);
    }
}
